<ol class="right">
<?php
$html = array();
foreach ($this->container as $page) 
{
    
    if(!$this->navigation()->accept($page)) {
        continue;
    } else {
        $indicator = $page->indicator;
        if ($indicator == "dashboard") {
            $html[] = "<li class=\"active\">";       
        } else {        
            $html[] = "<li>";
        }
    if (!empty($page->pages))            
    {        
        $hrefs = $page->getHref();
        $html[] = "<a href=\"{$hrefs}\" class=\"nest\">";
        $html[] = $page->getLabel();
        $html[] = "</a>";       
        $html[] = "<div class='nested'><div class='nested-wrapper'><ol>";
        foreach ($page->pages as $subpage) 
        {
            $html[] = "<li>";
            if ($href = $subpage->getHref()) $html[] = "<a href=\"{$href}\">";
            else $html[] = "<a>";
            $html[] = $subpage->getLabel();
            if ($href) $html[] = "</a>";
            else $html[] = "</a>";            
            $html[] = "</li>";
        }
        $html[] = "</ol><div class=\"clear-both\"></div></div><div class=\"cap-bottom\"></div></div>";
    } else {
        #$html[] = $this->menu()->htmlify($page) . PHP_EOL;
        
        $hrefs = $page->getHref();
        $html[] = "<a href=\"{$hrefs}\">";
        $html[] = $page->getLabel();
        $html[] = "</a>";   

    }

    $html[] = "</li>";
    }
}
$html[] = "</ol>";

echo join(PHP_EOL, $html);
?>